/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 
 * 
 *
 * 
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using System;
using System.Collections.Generic;
using System.Text;


namespace JDCloudSDK.Ipanti.Model
{

    /// <summary>
    ///  webRule
    /// </summary>
    public class WebRule
    {

        ///<summary>
        /// 规则 Id
        ///</summary>
        public string Id{ get; set; }
        ///<summary>
        /// 实例 Id
        ///</summary>
        public string InstanceId{ get; set; }
        ///<summary>
        /// 子域名
        ///</summary>
        public string Domain{ get; set; }
        ///<summary>
        /// 规则的 CNAME
        ///</summary>
        public string Cname{ get; set; }
        ///<summary>
        /// CNAME 解析状态, 0: 解析异常, 1: 解析正常
        ///</summary>
        public int? CnameStatus{ get; set; }
        ///<summary>
        /// 该规则使用中的高防 IP
        ///</summary>
        public string ServiceIp{ get; set; }
        ///<summary>
        /// 已配置的高防 IP 列表
        ///</summary>
        public ServiceIpConfig ServiceIpConfig{ get; set; }
        ///<summary>
        /// Protocol
        ///</summary>
        public WebRuleProtocol Protocol{ get; set; }
        ///<summary>
        /// 是否为自定义端口号, 0: 为默认, 1: 为自定义
        ///</summary>
        public int? CustomPortStatus{ get; set; }
        ///<summary>
        /// HTTP 协议的端口号, 如 80,81
        ///</summary>
        public List<int?> Port{ get; set; }
        ///<summary>
        /// HTTPS 协议的端口号, 如 443,8443
        ///</summary>
        public List<int?> HttpsPort{ get; set; }
        ///<summary>
        /// 是否开启 HTTP 回源, 0: 为不开启, 1: 为开启, 当勾选 HTTPS 时可以配置该属性
        ///</summary>
        public int? HttpOrigin{ get; set; }
        ///<summary>
        /// 0: 防御状态, 1: 回源状态
        ///</summary>
        public int? Status{ get; set; }
        ///<summary>
        /// 回源类型: A 或者 CNAME
        ///</summary>
        public string OriginType{ get; set; }
        ///<summary>
        /// 回源域名, originType 为 A 时返回该字段
        ///</summary>
        public List<OriginAddrItem> OriginAddr{ get; set; }
        ///<summary>
        /// 回源域名, originType 为 CNAME 时返回该字段
        ///</summary>
        public string OriginDomain{ get; set; }
        ///<summary>
        /// 备用的回源地址列表, 为一个域名或者多个 IP 地址
        ///</summary>
        public List<string> OnlineAddr{ get; set; }
        ///<summary>
        /// 证书状态. &lt;br&gt;- 0: 异常&lt;br&gt;- 1: 正常&lt;br&gt;- 2: 证书未上传
        ///</summary>
        public int? HttpCertStatus{ get; set; }
        ///<summary>
        /// 证书 Id, (废弃, 绑定证书信息通过 certs 字段查看)
        ///</summary>
        public string CertId{ get; set; }
        ///<summary>
        /// 证书名称, (废弃, 绑定证书信息通过 certs 字段查看)
        ///</summary>
        public string CertName{ get; set; }
        ///<summary>
        /// 证书内容, (废弃, 绑定证书信息通过 certs 字段查看)
        ///</summary>
        public string HttpsCertContent{ get; set; }
        ///<summary>
        /// 证书私钥, (废弃, 绑定证书信息通过 certs 字段查看)
        ///</summary>
        public string HttpsRsaKey{ get; set; }
        ///<summary>
        /// 网站规则绑定证书信息
        ///</summary>
        public List<Cert> BindCerts{ get; set; }
        ///<summary>
        /// 是否开启 HTTPS 强制跳转, 当 protocol 为 HTTP_HTTPS 时可以配置该属性&lt;br&gt;- 0: 不强跳&lt;br&gt;- 1: 开启强跳
        ///</summary>
        public int? ForceJump{ get; set; }
        ///<summary>
        /// 转发规则. &lt;br&gt;- wrr: 带权重的轮询&lt;br&gt;- rr:  不带权重的轮询&lt;br&gt;- sh:  源地址hash
        ///</summary>
        public string Algorithm{ get; set; }
        ///<summary>
        /// CC 状态, 0: CC 关闭, 1: CC 开启
        ///</summary>
        public int? CcStatus{ get; set; }
        ///<summary>
        /// webSocket 状态, 0: 关闭, 1: 开启
        ///</summary>
        public int? WebSocketStatus{ get; set; }
        ///<summary>
        /// 黑名单状态, 0: 关闭, 1: 开启
        ///</summary>
        public int? BlackListEnable{ get; set; }
        ///<summary>
        /// 白名单状态, 0: 关闭, 1: 开启
        ///</summary>
        public int? WhiteListEnable{ get; set; }
        ///<summary>
        /// 按区域分流回源配置
        ///</summary>
        public List<GeoRsRoute> GeoRsRoute{ get; set; }
        ///<summary>
        /// 是否开启回源长连接, protocol 选项开启 https 时生效, 可取值&lt;br&gt;- on: 开启&lt;br&gt;- off: 关闭
        ///</summary>
        public string EnableKeepalive{ get; set; }
        ///<summary>
        /// http 版本, protocol 选项开启 https 时生效, 可取值 http1 或 http2
        ///</summary>
        public string HttpVersion{ get; set; }
        ///<summary>
        /// SSL协议类型, protocol 选项开启 https 时生效, 可取值SSLv2,SSLv3,TLSv1.0,TLSv1.1,TLSv1.2
        ///</summary>
        public List<string> SslProtocols{ get; set; }
        ///<summary>
        /// 加密套件等级, protocol 选项开启 https 时生效, 可取值&lt;br&gt;- low: 低级&lt;br&gt;- middle: 中级&lt;br&gt;- high：高级&lt;br&gt;- custom：自定义
        ///</summary>
        public string SuiteLevel{ get; set; }
        ///<summary>
        /// 自定义加密套件等级, suiteLevel 为 custom 是有效
        ///</summary>
        public List<string> UserSuiteLevel{ get; set; }
        ///<summary>
        /// 是否允许在 response 中插入 JS, 0: 关闭, 1: 开启
        ///</summary>
        public int? JsFingerprintEnable{ get; set; }
        ///<summary>
        /// JS 指纹生效范围, 0: 所有页面, 1: 已配置的自定义页面
        ///</summary>
        public int? JsFingerprintScope{ get; set; }
        ///<summary>
        /// CC自定义规则总开关, 0: 关闭, 1: 开启
        ///</summary>
        public int? CcCustomStatus{ get; set; }
        ///<summary>
        /// 健康检查开关, 0: 关闭, 1: 开启
        ///</summary>
        public int? EnableHealthCheck{ get; set; }
        ///<summary>
        /// 回源连接超时时长, 单位 秒
        ///</summary>
        public int? ProxyConnectTimeout{ get; set; }
        ///<summary>
        /// 请求头支持下划线, 0: 关闭, 1: 开启
        ///</summary>
        public int? EnableUnderscores{ get; set; }
    }
}
